package org.hongqi.common.senpec.sys.role;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.hongqi.common.senpec.base.mybatisplus.IBaseMapper;

import java.util.Collection;

@Mapper
@CacheNamespace
public interface RoleMapper extends IBaseMapper<Role> {

    Collection<Role> selectRolesByUserId(Long userId);

    Integer deleteRoleIdByUserId(Long userId, Long roleId);

    Integer insertRoleIdByUserId(Long userId, Long roleId);

    Role selectByRoleName(String roleName);
}
